#if !defined(MGOPTION_H_INCLUDED)
#define MGOPTION_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MGOption.h : header file
//
#include "MGConstant.h"

template<class TImpl = CMGOptionImpl>
class CMGOption : public TImpl
{
public:
	CMGOption() : TImpl() { }

public:
	inline void Cleanup() { TImpl::Cleanup(); }

public:
	inline BOOL EnableAutoloadingOnStartup(BOOL bEnable = TRUE) { return TImpl::EnableAutoloadingOnStartup(bEnable); }
	inline BOOL IsAutoLoadingOnStartup() const { return TImpl::IsAutoLoadingOnStartup(); }

	inline BOOL EnableMG(BOOL bEnable = TRUE) { return TImpl::EnableMG(bEnable); }
	inline BOOL IsMGEnabled() const { return TImpl::IsMGEnabled(); }

	inline UINT SetPageTopBottomRecognitionArea(UINT nPageTopBottomRecognitionArea = 5) { return TImpl::SetPageTopBottomRecognitionArea(nPageTopBottomRecognitionArea); }
	inline UINT GetPageTopBottomRecognitionArea() const { return TImpl::GetPageTopBottomRecognitionArea(); }

	inline BOOL EnablePageTopBottom(BOOL bEnable) { return TImpl::EnablePageTopBottom(bEnable); }
	inline BOOL IsPageTopBottom() const { return TImpl::IsPageTopBottom(); }

	inline BOOL EnablePageUpDown(BOOL bEnable) { return TImpl::EnablePageUpDown(bEnable); }
	inline BOOL IsPageUpDown() const { return TImpl::IsPageUpDown(); }

	inline BOOL EnableDblClkScrolling(BOOL bEnable) { return TImpl::EnableDblClkScrolling(bEnable); }
	inline BOOL IsDblClkScrollingEnabled() const { return TImpl::IsDblClkScrollingEnabled(); }
	
	inline BOOL UseMiddleButtonForDblClkScrolling(BOOL bUse) { return TImpl::UseMiddleButtonForDblClkScrolling(bUse); }
	inline BOOL IsMiddleButtonForDblClkScrolling() const { return TImpl::IsMiddleButtonForDblClkScrolling(); }
	
	/// the minimum amount of pixels over which it is required to move to be recognize as a gesture (default = 15 pixels)
	inline UINT SetGestureRecognitionSensitivity(UINT nSensitivity = 15) { return TImpl::SetGestureRecognitionSensitivity(nSensitivity); }
	inline UINT GetGestureRecognitionSensitivity() const { return TImpl::GetGestureRecognitionSensitivity(); }

	/// if set, the main application will not have chance to handle, nor even to see the Mouse Gesture Activation Button down message (WM_BUTTONDOWN)
	inline BOOL EnablePreemptiveMGAButtonAlways(BOOL bEnable = TRUE) { return TImpl::EnablePreemptiveMGAButtonAlways(bEnable); }
	inline BOOL IsPreemptiveMGAButtonAlways() const { return TImpl::IsPreemptiveMGAButtonAlways(); }
	
	inline UINT SetMGAButton(UINT nButton) { return TImpl::SetMGAButton(nButton); }
	inline UINT SetMGAButton(enum MG::Button button) { return TImpl::SetMGAButton(button); }
	inline enum MG::Button GetMGAButton() const { return TImpl::GetMGAButton(); }
	
	/// VK_SHIFT, VK_CONTROL or VK_MENU
	inline int SetMGSuspendingKey(int nVirtualKey) { return TImpl::SetMGSuspendingKey(nVirtualKey); }
	inline int SetMGSuspendingKey(enum MG::VirtualKey virtualKey) { return TImpl::SetMGSuspendingKey(virtualKey); }
	inline int GetMGSuspendingKey() const { return TImpl::GetMGSuspendingKey(); }

	inline BOOL EnableMGSuspendingKey(BOOL bEnable = TRUE) { return TImpl::EnableMGSuspendingKey(bEnable); }
	inline BOOL IsMGSuspendingKeyEnabled() const { return TImpl::IsMGSuspendingKeyEnabled(); }
	
	/// same direction repeat detection rate in msec (default = 300 ms)
	inline UINT SetDetectingRepeatedSameDirectionRate(UINT nRate = 300) { return TImpl::SetDetectingRepeatedSameDirectionRate(nRate); }
	inline UINT GetDetectingRepeatedSameDirectionRate() const { return TImpl::GetDetectingRepeatedSameDirectionRate(); }

	/// show the entered mouse gesture on status bar
	inline BOOL EnableShowRecognitionOnStatusBar(BOOL bEnable = TRUE) { return TImpl::EnableShowRecognitionOnStatusBar(bEnable); }
	inline BOOL IsShowRecognitionOnStatusBar() const { return TImpl::IsShowRecognitionOnStatusBar(); }
	
	/// show the target window's class name on status bar
	inline BOOL EnableIdentifyTargetWindowClass(BOOL bEnable = TRUE) { return TImpl::EnableIdentifyTargetWindowClass(bEnable); }
	inline BOOL IsIdentifyTargetWindowClass() const { return TImpl::IsIdentifyTargetWindowClass(); }

	/// enable help tips (default popup delay time = 2000 ms)
	inline BOOL EnableHelpTip(BOOL bEnable = TRUE) { return TImpl::EnableHelpTip(bEnable); }
	inline BOOL IsHelpTipEnabled() const { return TImpl::IsHelpTipEnabled(); }
	inline UINT SetDelayTimeHelpTip(UINT nMilliseconds = 2000) { return TImpl::SetDelayTimeHelpTip(nMilliseconds); }
	inline UINT GetDelayTimeHelpTip() const { return TImpl::GetDelayTimeHelpTip(); }
	
public:
	inline void UpdateRegistry(BOOL bSaveAndValidate = TRUE) { TImpl::UpdateRegistry(bSaveAndValidate); }
};

#endif // !defined(MGOPTION_H_INCLUDED)
